<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        //energy_storager_stations
        Schema::create('e_s_stations', function (Blueprint $table) { 
            $table->id();
            $table->string('name')->nullable(true)->comment('名称');
            $table->string('zone')->nullable(true)->comment('地区:省市区');
            $table->string('address')->nullable(true)->comment('详细地址');
            $table->string('director')->nullable(true)->comment('负责人');
            $table->string('mobile')->nullable(true)->comment('联系电话');
            $table->string('remarks')->nullable(true)->comment('备注');
            $table->decimal('lng', 15, 11)->nullable(true)->comment('经度');
            $table->decimal('lat', 15, 11)->nullable(true)->comment('纬度');
            $table->unsignedBigInteger('enterprise_id')->comment('所属企业id');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('e_s_stations');
    }
};
